import request from '@/utils/request'
/**
 * 查询字典项
 */
export function getDictByCode(dictCode) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/sysDictionary/getDictByCode',
    method: 'get',
    params: {
      dictCode
    }
  })
}
/**
 * 异步组织部门树
 */
export function getComAndOrgTree(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/orgInfo/queryOrgAndDep',
    method: 'post',
    data
  })
}

/**
 * 全部组织部门树
 */
export function getOrgAndDepTreeByName(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/orgInfo/getOrgAndDepTreeByName',
    method: 'post',
    data
  })
}

/**
 * 查询用户列表
 * @param {*} data
 */
export function queryPageDeptUser(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/sysUserLogin/userSelectQueryPage',
    method: 'post',
    data
  })
}

/**
 * 查询组织
 * @param {*} data
 */
export function getComTreeSync(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: 'orgInfo/getLeafForDeptManage',
    method: 'post',
    data
  })
}

